/* -----------------------------------------------------------------------
 * Christine Hayes
 * Using provided template testUpdateCoins.c
 * This test is for the getCost() function.
 * The asserts are based off of the game rules here: 
 * riograndegames.com/getFile.php?id=348, http://dominionstrategy.com/all-cards/
 *
 * I saw the warning posted about testing return values for this assignment,
 * but in this case, the function is supposed to return a variety of values,
 * so I think that it's ok.
 * -----------------------------------------------------------------------
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

// set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1

int main() {

	int cost;
	
    printf ("TESTING getCost():\n");

            
#if (NOISY_TEST == 1)
                printf("Test copper\n");
#endif

				cost = getCost(copper);
#if (NOISY_TEST == 1)
                printf("Cost = %d, expected = %d\n", cost, 0);
#endif
                assert(cost == 0); // check if the cost is correct

				cost = getCost(silver);
#if (NOISY_TEST == 1)
                printf("Test silver\n");
                printf("Cost = %d, expected = %d\n", cost, 3);
#endif
                assert(cost == 3); // check if the cost is correct

				cost = getCost(gold);
#if (NOISY_TEST == 1)
                printf("Test gold\n");
                printf("Cost = %d, expected = %d\n", cost, 6);
#endif
                assert(cost == 6); // check if cost is correct
				
				cost = getCost(smithy);
#if (NOISY_TEST == 1)
                printf("Test smithy\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct

				cost = getCost(curse);
#if (NOISY_TEST == 1)
                printf("Test curse\n");
                printf("Cost = %d, expected = %d\n", cost, 0);
#endif
                assert(cost == 0); // check if cost is correct
				
				cost = getCost(estate);
#if (NOISY_TEST == 1)
                printf("Test estate\n");
                printf("Cost = %d, expected = %d\n", cost, 2);
#endif
                assert(cost == 2); // check if cost is correct

				cost = getCost(duchy);
#if (NOISY_TEST == 1)
                printf("Test duchy\n");
                printf("Cost = %d, expected = %d\n", cost, 5);
#endif
                assert(cost == 5); // check if cost is correct

				cost = getCost(province);
#if (NOISY_TEST == 1)
                printf("Test province\n");
                printf("Cost = %d, expected = %d\n", cost, 8);
#endif
                assert(cost == 8); // check if cost is correct

				cost = getCost(gardens);
#if (NOISY_TEST == 1)
                printf("Test gardens\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct

				cost = getCost(mine);
#if (NOISY_TEST == 1)
                printf("Test mine\n");
                printf("Cost = %d, expected = %d\n", cost, 5);
#endif
                assert(cost == 5); // check if cost is correct		

				cost = getCost(adventurer);
#if (NOISY_TEST == 1)
                printf("Test adventurer\n");
                printf("Cost = %d, expected = %d\n", cost, 6);
#endif
                assert(cost == 6); // check if cost is correct		
				
				cost = getCost(council_room);
#if (NOISY_TEST == 1)
                printf("Test council_room\n");
                printf("Cost = %d, expected = %d\n", cost, 5);
#endif
                assert(cost == 5); // check if cost is correct	

				cost = getCost(feast);
#if (NOISY_TEST == 1)
                printf("Test feast\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct		

				cost = getCost(remodel);
#if (NOISY_TEST == 1)
                printf("Test remodel\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct			

				cost = getCost(village);
#if (NOISY_TEST == 1)
                printf("Test village\n");
                printf("Cost = %d, expected = %d\n", cost, 3);
#endif
                assert(cost == 3); // check if cost is correct

				cost = getCost(baron);
#if (NOISY_TEST == 1)
                printf("Test baron\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct						

				cost = getCost(great_hall);
#if (NOISY_TEST == 1)
                printf("Test great_hall\n");
                printf("Cost = %d, expected = %d\n", cost, 3);
#endif
                assert(cost == 3); // check if cost is correct	

				cost = getCost(minion);
#if (NOISY_TEST == 1)
                printf("Test minion\n");
                printf("Cost = %d, expected = %d\n", cost, 5);
#endif
                assert(cost == 5); // check if cost is correct		

				cost = getCost(steward);
#if (NOISY_TEST == 1)
                printf("Test steward\n");
                printf("Cost = %d, expected = %d\n", cost, 3);
#endif
                assert(cost == 3); // check if cost is correct		

				cost = getCost(tribute);
#if (NOISY_TEST == 1)
                printf("Test tribute\n");
                printf("Cost = %d, expected = %d\n", cost, 5);
#endif
                assert(cost == 5); // check if cost is correct		

				cost = getCost(ambassador);
#if (NOISY_TEST == 1)
                printf("Test ambassador\n");
                printf("Cost = %d, expected = %d\n", cost, 3);
#endif
                assert(cost == 3); // check if cost is correct		

				cost = getCost(cutpurse);
#if (NOISY_TEST == 1)
                printf("Test cutpurse\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct		

				cost = getCost(embargo);
#if (NOISY_TEST == 1)
                printf("Test embargo\n");
                printf("Cost = %d, expected = %d\n", cost, 2);
#endif
                assert(cost == 2); // check if cost is correct		

				cost = getCost(outpost);
#if (NOISY_TEST == 1)
                printf("Test outpost\n");
                printf("Cost = %d, expected = %d\n", cost, 5);
#endif
                assert(cost == 5); // check if cost is correct		

				cost = getCost(salvager);
#if (NOISY_TEST == 1)
                printf("Test salvager\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct		

				cost = getCost(sea_hag);
#if (NOISY_TEST == 1)
                printf("Test sea_hag\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct		

				cost = getCost(treasure_map);
#if (NOISY_TEST == 1)
                printf("Test treasure_map\n");
                printf("Cost = %d, expected = %d\n", cost, 4);
#endif
                assert(cost == 4); // check if cost is correct						
    printf("All tests passed!\n");

    return 0;
}